Setting culling

In Kanzi render passes you can optimize the performance of meshes in your applications by setting the culling properties.

Setting the culling properties

To set the culling properties:

  1. In the Library select Rendering > Render Passes and the Pipeline State Render Pass you are using, or create a new Pipeline State Render Pass.
    Note that you can set the culling only for the render passes you create, and not for the default render pass.
  2. In the Properties set the Cull Mode property to Back so that polygons whose normals point away from the active camera are not rendered

Controlling culling

You can control culling for individual meshes. This is useful when, for example, a vertex shader radically modifies the geometry of nodes, such as vertex skinned nodes.

To control culling:

  1. In the Project select the node for which you want to control culling.
  2. In the Properties click , and add the Frustum Cull Margin property.
  3. Adjust the cull margin of the node.
    To see if your culling setting works as you intended it to work, in the Preview click to enter the Analyze mode, right-click , select the Performance HUD, and move the camera away from the node for which you want to control culling. When culling does not occur anymore for the node, Batch count value drops.

See also

Reducing the number of rendered vertices

Setting the correct size of vertex cache

Loading resources in parallel

Troubleshooting the performance of your application

Best practices